﻿Imports Org.BouncyCastle.Crypto
Imports System.Xml.Serialization
Imports ProgettoSicurezza.CertificationAuthority.MyCertificateManager
Imports Org.BouncyCastle.Security
Imports Org.BouncyCastle.Asn1.Pkcs
Imports Org.BouncyCastle.X509
Imports Org.BouncyCastle.Pkcs
Imports Org.BouncyCastle.Crypto.Parameters


Public Class CAdata

    <XmlIgnore()> Public Property BouncyCastlePrivateKey As RsaPrivateCrtKeyParameters
        

    <XmlIgnore()> Public ReadOnly Property BouncyCastlePublicKey As RsaKeyParameters
        Get
            Return DirectCast(MyCertificate.GetPublicKey, RsaKeyParameters)
        End Get
    End Property

    <XmlIgnore()> Public ReadOnly Property BouncyCastleKeypair As AsymmetricCipherKeyPair
        Get
            Return New AsymmetricCipherKeyPair(BouncyCastlePublicKey, BouncyCastlePrivateKey)
        End Get
    End Property


    <XmlIgnore()> Public Property MyCertificate As X509Certificate

End Class
